package models.game;

import java.util.ArrayList;
import java.util.HashMap;

import models.city.City;
import models.decks.InfectionDeck;
import models.decks.PlayerDeck;
import models.desease.Disease;
import models.players.Player;

public class Game {

	private static int gameID = 0;

	private HashMap<String, Player> players;
	private HashMap<String, Disease> diseases;
	private HashMap<String, City> cities;
	private PlayerDeck playerDeck;
	private InfectionDeck infectionDeck;
	private ArrayList<String> log;

	private int outbreaks;
	private boolean gameIsLost;
	private boolean gameIsWon;
	private String loosingReason;
	private int activeTurn;
	private int actions;
	
	public Game(){};

	public Game(HashMap<String, Player> players) {

		this.players = new HashMap<String, Player>();
		this.players.putAll(players);
		gameID++;

		this.outbreaks = 0;
		this.gameIsLost = false;
		this.gameIsWon = false;
		this.activeTurn = 1;
		this.actions = 1;
		this.log = new ArrayList<String>();

		// this.diseases =
		// this.cities =
		// this.playerDeck =
		// this.infectionDeck =

	}
	
	public String getLoosingReason() {
		return loosingReason;
	}
	
	public void setLoosingReason(String loosingReason) {
		this.loosingReason = loosingReason;
	}

	public ArrayList<String> getLog() {
		return log;
	}
	
	public void setLog(ArrayList<String> log) {
		this.log = log;
	}
	
	public int getActions() {
		return actions;
	}
	
	public void setActions(int actions) {
		this.actions = actions;
	}
	
	public int getActiveTurn() {
		return activeTurn;
	}
	
	public void setActiveTurn(int activeTurn) {
		this.activeTurn = activeTurn;
	}

	public static int getGameID() {
		return gameID;
	}

	public boolean getGameIsLost() {
		return this.gameIsLost;
	}

	public void setGameIsLost(boolean gameIsLost) {
		this.gameIsLost = gameIsLost;
	}

	public boolean getGameIsWon() {
		return this.gameIsWon;
	}

	public void setGameIsWon(boolean gameIsWon) {
		this.gameIsWon = gameIsWon;
	}

	public HashMap<String, City> getCities() {
		return cities;
	}

	public void setCities(HashMap<String, City> cities) {
		this.cities = cities;
	}

	public HashMap<String, Disease> getDiseases() {
		return diseases;
	}

	public void setDiseases(HashMap<String, Disease> diseases) {
		this.diseases = diseases;
	}

	public InfectionDeck getInfectionDeck() {
		return infectionDeck;
	}

	public void setInfectionDeck(InfectionDeck infectionDeck) {
		this.infectionDeck = infectionDeck;
	}

	public PlayerDeck getPlayerDeck() {
		return playerDeck;
	}

	public void setPlayerDeck(PlayerDeck playerDeck) {
		this.playerDeck = playerDeck;
	}

	public HashMap<String, Player> getPlayers() {
		return players;
	}

	public int getOutbreaks() {
		return outbreaks;
	}

	public void setOutbreaks(int outbreaks) {
		this.outbreaks = outbreaks;
	}
}
